<?php $this->load->view('home/layout/header') ?>
<header class="my-head flex">
    <div class="my-return">
        <a href="javascript:history.go(-1);">
            <i class="iconfont icon-zuojiantou"></i>
        </a>
    </div>
    <div class="my-name">
        我的银行卡
    </div>
</header>
<section class="card-text widthMax">
    <?php if ( empty($userInfo->payment_password) ) : ?>
    <div class="card-banner flex">
        <p class="flex-1">为了您的账户安全，请设置支付密码</p>
        <a href="<?php echo site_url('home/safetycenter/setFirstPaymentPass'); ?>">立即设置</a>
    </div>
    <?php endif; ?>
    <?php if ( $bankList->num_rows() > 0 ) : ?>
    <ul class="brank-ul">
        <?php foreach( $bankList->result() as $value ) : ?>
        <li>
            <a href="<?php echo site_url('home/card/modifyBankCard/' . $value->user_bank_id); ?>" class="flex">
                <img src="<?php echo 'skins/home/images/bank68/bank-', $value->bank_id, '.png'; ?>">
                <div class="brank-num flex-1">
                    <h6><?php echo $value->bank_name; ?></h6>
                    <p><?php
                    $len = strlen($value->bank_card) - 4; 
                    echo substr_replace($value->bank_card, str_repeat('*', $len), 0, $len); //卡号后面只留4位
                    ?></p>
                </div>
            </a>
        </li>
        <?php endforeach; ?>
    </ul>
    <?php endif; ?>
    <div class="full-submit">
        <a href="<?php echo site_url('home/card/bindBankCard'); ?>" class="add-branks">
            <i class="iconfont icon-icon--"></i>添加银行卡
        </a>
    </div>
</section>
<?php $this->load->view('home/layout/tip'); ?>
<?php $this->load->view('home/layout/footer'); ?>